package com.aaron.study.hashset;

import java.util.HashSet;

/**
 * @author liurong
 * @date 2021/9/5 16:05
 * @version:
 */
public class HashSetDemo {

    public static void main(String[] args) {

        HashSet<Student> hs = new HashSet<Student>();
        hs.add(new Student("张三",20));
        hs.add(new Student("李四",18));
        hs.add(new Student("李四", 18));

        for (Student student : hs) {
            System.out.println(student);
        }

    }

}

